#ifndef  PROTOCOLS_ROCE_ROCE_CONNECTION_BASE_H_
#define  PROTOCOLS_ROCE_ROCE_CONNECTION_BASE_H_

#include <omnetpp.h>

#include "inet/common/packet/Packet.h"
#include "inet/networklayer/common/L3Address.h"

namespace ai_sim {

enum RoceType {
  DCQCN = 1,
};

class RoceConnectionBase {
  public:
    static std::unique_ptr<RoceConnectionBase> CreateRoceConnection(
        const inet::L3Address& src_addr, const inet::L3Address& dst_addr,
        int src_port, int dst_port, RoceType type);
    virtual ~RoceConnectionBase() {}
    virtual void HandlePacketFromHigherLayer(const FlowMsg& f_msg) = 0;
    virtual void HandlePacketFromLowerLayer(inet::Packet& packet) = 0;
    virtual inet::Packet* GetNextDataPacket(omnetpp::simtime_t* time) = 0;
    virtual inet::Packet* GetNextControlPacket() = 0;
    virtual FlowMsg* GetReceivedFlowMessage() = 0;
};

}  // namespace ai_sim

#endif  // PROTOCOLS_ROCE_ROCE_CONNECTION_BASE_H_